<template >
  <div class="list-token">
    <div class="wrap">
      <div class="hd">
        <div class="icon">
          <img :src='`/${type}.png`' alt="图标加载失败">
          <p>{{ type }}</p>
        </div>
        <div class="btn" @click="$router.push(`/incomeExchange/${index}`)">
          {{ type === "USDT" ? 'Withdrawal' : 'Exchange' }}
        </div>
      </div>
      <div class="bd">
        <div class="box">
          <div class="title">Total</div>
          <div class="desc">0 {{ type }}</div>
        </div>
        <div class="box">
          <div class="title">Freeze</div>
          <div class="desc">0 USDT</div>
        </div>
        <div class="box">
          <div class="title">Available</div>
          <div class="desc">0 {{ type }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    type: {
      type: String,
      required: true
    },
    index: {
      type: String,
      default: "0"
    }
  },
  data () {
    return {

    }
  },
  methods: {}
}
</script>

<style lang="scss" >
.list-token {
  width: 345px;
  background: #fff;
  box-shadow: 0px 2px 8px rgb(39 6 127 / 10%);
  border-radius: 8px;
  padding: 0 15px;
  margin: 0 auto;
  margin-top: 15px;

  .hd {
    @include between;
    height: 58px;

    .icon {
      @include vC;

      img {
        margin-right: 4px;
        width: 28px;
        height: 28px;
        background-color: #f0f0f0;
        border-radius: 50%;
      }

      p {
        font-weight: 600;
        font-size: 18px;
      }
    }

    .btn {
      height: 22px;
      background: #0162ff;
      border-radius: 4px;
      display: flex;
      justify-content: center;
      line-height: 22px;
      font-size: 12px;
      color: #fff;
      padding: 0 5px;
    }
  }

  .bd {
    @include between;

    .box {
      font-size: 12px;
      width: 33%;
      text-align: center;

      .title {
        color: #999;
        height: 26px;
        padding-top: 2px;
      }

      .desc {
        color: #333;
        font-weight: 600;
        height: 32px;
        padding-top: 2px;
      }
    }
  }
}
</style>
